package org.yxj.bulletinlib;

import android.view.View;

import java.util.List;

public abstract class BulletinAdapter<T> {


    private List<T> list ;


    public BulletinAdapter(List<T> list){
        this.list=list ;
    }



    public List<T> getList() {
        return list;
    }


    /**
     *
     * @return
     */
    protected abstract int onLayoutId();


    /**
     * 处理回调事件     *
     * @param view
     * @param t
     */
    protected abstract void onBindItemView(View view,T t,int position);


    /**
     * 点击事件
     */
    private ItemBulletinClickListener itemBulletinClickListener;

    public void setItemBulletinClickListener(ItemBulletinClickListener itemBulletinClickListener){
        this.itemBulletinClickListener = itemBulletinClickListener ;
    }

    public ItemBulletinClickListener getItemBulletinClickListener() {
        return itemBulletinClickListener;
    }
}

